#ifndef ADD_SPH_VECTOR_GUARD
#define ADD_SPH_VECTOR_GUARD

#include <cmath>

// Simple vector container using spherical coordinates with
// r = 1.  Conversions are done immediately to cartesian coordinates 
// where all calculations are done.  Coordinate transformation back to spherical
// is only done when get_theta or get_phi is called.

class sph_vector
{
  private:
    double x,y,z;
  
  public:
	sph_vector(double theta, double phi);
	sph_vector(double x, double y, double z);
	sph_vector();
    
	double get_x() { return x; }
	double get_y() { return y; }
	double get_z() { return z; }

	double get_theta();
	double get_phi();

	double norm();

	sph_vector operator + (sph_vector);
	sph_vector operator * (double);
};

double euc_distance(sph_vector a, sph_vector b);

double energy(sph_vector a, sph_vector b);

sph_vector dir_vector(sph_vector a, sph_vector b);

sph_vector force_vector(sph_vector a, sph_vector b, double weight);

#endif

